﻿using GalaSoft.MvvmLight;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TYRTUBase;

namespace TYControl_For_RTU
{
    public class ViewModelComInfo : ViewModelBase
    {
        public ViewModelComInfo()
        {
            ListSpeed.Clear();
            ListSpeed.Add(EnumIRMeasSpd.EXFAST);
            ListSpeed.Add(EnumIRMeasSpd.FAST);
            ListSpeed.Add(EnumIRMeasSpd.MEDIUM);
            ListSpeed.Add(EnumIRMeasSpd.SLOW);
        }

        private ObservableCollection<EnumIRMeasSpd> _ListSpeed = new ObservableCollection<EnumIRMeasSpd>();
        public ObservableCollection<EnumIRMeasSpd> ListSpeed { get { return _ListSpeed; } set { Set("ListSpeed", ref _ListSpeed, value); } }

        private int _SpeedIndex;
        public int SpeedIndex { get => _SpeedIndex; set => Set("SpeedIndex", ref _SpeedIndex, value); }

        private ObservableCollection<ViewModelComBase> _ListComModel = new ObservableCollection<ViewModelComBase>();
        public ObservableCollection<ViewModelComBase> ListComModel { get { return _ListComModel; } set { Set("ListComModel", ref _ListComModel, value); } }

        private ViewModelComBase _SelectedCOM;

        public ViewModelComBase SelectedCOM { get => _SelectedCOM; set => Set("SelectedCOM", ref _SelectedCOM, value); }

        private bool _CanSend;
        public bool CanSend { get => _CanSend; set => Set("CanSend", ref _CanSend, value); }

        private bool _IsXMode;
        public bool IsXMode { get => _IsXMode; set => Set("IsXMode", ref _IsXMode, value); }
    }
}